package com.zhijian.warehouse.manage.entity.dto.stock;

import lombok.Builder;
import lombok.Data;
import lombok.experimental.Tolerate;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
@Builder
public class StockStorageDto {
    /**
     * 商品id
     */
    @NotNull
    public Long productId;
    /**
     * 数量
     */
    @NotNull
    public BigDecimal count;

    @NotNull
    private Long warehouseLocationId;
    @NotNull
    private Long warehouseId;

    private String productIdLocationId;

    public String getProductIdLocationId() {
        return String.format("%s_%s", this.warehouseLocationId,this.productId );
    }

    @Tolerate
    public StockStorageDto() {
    }
}
